#include "app_wifi.h"

#define LOG_TAG                        "at.wifi"
#include <at_log.h>

#define ESP8266_DEIVCE_NAME     "wifi"
#define ESP8266_CLIENT_NAME     "uart3"
#define ESP8266_RECV_BUFF_LEN		1024


WIFI_STA ESP8266_STA;

extern dev_config dev_config_info;

static struct at_device_esp8266 wifi =
{
    ESP8266_DEIVCE_NAME,
    ESP8266_CLIENT_NAME,

    dev_config_info.net.ssid,
    dev_config_info.net.pwd,
    ESP8266_RECV_BUFF_LEN,
};

int wifi_register(void)
{
    struct at_device_esp8266 *esp8266 = &wifi;

    return at_device_register(&(esp8266->device),
                              esp8266->device_name,
                              esp8266->client_name,
                              AT_DEVICE_CLASS_ESP8266,
                              (void *) esp8266);
}

